package com.haiyou.email.service;


import com.haiyou.email.model.Email;

import java.util.List;

/**
 * 邮箱服务
 */
public interface SpringEmailService {

    /**
     * 批量发送邮件
     *
     * @param receivers
     * @param subject
     * @param content
     */
    void batchSendEmail(String[] receivers, String subject, String content);

    /**
     * 批量发送邮件-有附件
     *
     * @param receivers
     * @param subject
     * @param content
     * @param filePathList
     */
    void batchSendEmail(String[] receivers, String subject, String content, List<String> filePathList);

    /**
     * 纯文本发送
     *
     * @param mail
     */
    void sendText(Email mail);

    /**
     * 模版发送 freemarker
     *
     * @param mail
     */
    void sendFreemarker(Email mail);

    /**
     * 发送验证码
     *
     * @param receiver
     * @param subject
     * @param content
     */
    void sendValidCode(String receiver, String subject, String content);

    /**
     * 验证邮箱码
     *
     * @param email
     * @param validCode
     */
    void validEmailCode(String email, String validCode);
}
